﻿@model IEnumerable<BookStore.Models.Categorie>

<table width="100%" style="text-align:center;margin-bottom:50px;">
    <tr style="font-size:16px;line-height:30px;background-color:lightsteelblue;">
        <th width="15%">编号</th>
        <th style="border-left:1px solid gray;border-right:1px solid gray;">分类名称</th>
        <th width="15%">操作</th>
    </tr>
        @{
        bool flag = false;
    }
    @foreach (var c in Model)
    {
        <tr @if(flag==false){
                <text>style="font-size:14px;line-height:25px;"</text>
            }else{
                <text>style="font-size:14px;line-height:25px;background-color:lightblue;"</text>
            }>
            <td width="15%" style="border-left:1px solid gray;border-right:1px solid gray;">@c.Id</td>
            <td>@c.Name</td>
            <td width="15%" style="border-left:1px solid gray;border-right:1px solid gray;">
                @Html.ActionLink("编辑", "Edit", "Category", new { id=c.Id},null)
                @Html.ActionLink("删除", "Delete", "Category", new { id = c.Id }, new { onclick="return confirm('是否要删除此图书分类？');"})
            </td>
        </tr>
        flag = !flag;
    }
</table>